{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "__author__ = \"Neelabh Pant\"\n",
    "## Date: 06/14/2017"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Project Description\n",
    "\n",
    "A Lot of people leaving the company recently and we would like to understand why that's happening. We have historical data on employees and in this project we would like to build a model that is able to predict which employee will leave next. We have built a model that is better than random guessing. Here in this project we also prefer false negatives than false positives. Fields in the dataset include:\n",
    "* Employee satisfaction level\n",
    "* Last evaluation\n",
    "* Number of projects\n",
    "* Average monthly hours\n",
    "* Time spent at the company\n",
    "* Whether they have had a work accident\n",
    "* Whether they have had a promotion in the last 5 years\n",
    "* Department\n",
    "* Salary\n",
    "* Whether the employee has left\n",
    "\n",
    "The goal of this project is to predict the binary outcome variable \"left\" using the rest of the data. Since the outcome is binary, this is a classification problem.\n",
    "\n",
    "This dataset comes from (https://www.kaggle.com/ludobenistant/hr-analytics/) and is released under CC BY-SA 4.0 License."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from __future__ import division"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.metrics import r2_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [],
   "source": [
    "from keras.utils import to_categorical\n",
    "from keras.models import Sequential\n",
    "from keras.layers import Dense\n",
    "from keras.optimizers import SGD, Adam"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df = pd.read_csv('/Users/neelabhpant/Documents/Deep Learning/zero_to_deep_learning_udemy/data/HR_comma_sep.csv')\n",
    "df_toplot = df.copy()\n",
    "df_tocopy=df_toplot.drop(['salary', 'sales'], axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEFCAYAAAD5bXAgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHUFJREFUeJzt3Xm4XVWd5vHvyyCCzCbSIYMBO2AllEa4UjiAKGURQQUs\nC4JVgEoTEQrF1qcEykdoq2JjO6MNGBEBlSESQBTQCpSA9UiIAUMGMBpIkIRAwqBhaiDJ23/sdeVw\n2Tc5Cfecc4f38zznuXuvvfbav7uf5P7OWntYsk1ERERPm3U6gIiI6J+SICIiolYSRERE1EqCiIiI\nWkkQERFRKwkiIiJqJUFEREStJIgY1CTtL2lRE/Uk6fuSHpc0u49jOEPSBX3ZZo/2D5S0rFXtNxzH\nkv57q48T/ccWnQ4goi9JMjDO9mIA278C9mxi17cD7wZG2X7qZRz/QOCHtkd1l9n+4qa2F9FJ6UFE\nVF4LLH05ySFisEmCiH5L0mclLZf0hKRFkg6StK+k2yT9SdIKSd+W9IpS/9ay612SnpR0VM/hl17a\nPB64AHhL2e9/SdpJ0s8krSrDTj+TNKqhnZ3LkNSDZfs1kl4F3ADsWtp5UtKuks6S9MOGfd8vaWH5\nHW6W9FcN25ZK+oykeZL+LOkKSa/cyPO2q6QZJfYlkj7RUP6MpJ0b6r5J0iOStizrH5V0T/mdfiHp\ntRtz7BhckiCiX5K0J/DPwJttbwccDCwF1gKfAoYBbwEOAk4CsH1A2f2Ntre1fUUzbdr+HnAicFvZ\n70yq/xvfp+pZjAGeAb7d0NwPgG2ACcBrgK+X3sd7gAdLO9vafrBHDHsAlwGnAsOB64Gfdie54khg\nErAb8Abgwxtx3jYDfgrcBYws5+dUSQeXWG4D/r5hlw8BV9p+XtJhwBnAB0psvyqxxhCVBBH91Vpg\nK2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GL7FklfoHp1wqll2xa29y0J6kzgb5s4B/8K/Kftj0raEZgt6UbgCuBI4ExV8wOMsD1H0hd7\nqR/xEulBxEA2H3h3+ea9v+0/A++UdHt5P8+7gAnrb4L7gN0lfUvSJKC3V0V/QtJdVJM1jQbGUc3g\ndavtJQC21zexS3cC29F29xShF1PNGNbtqvLzDmDsBuLu9nfAaZLmAjcDrwTGANOB7ulYj6R6seH6\n6ke8RHoQMWDZ/r2qOXgPAf5d0k3AyUCX7QcknUX1B3B9bTyuan7vg6mGho4EPtpYR9KBVN/m32L7\naUk3b6jdTfRs+bmW5v9vCvh724teskF6VNUr4o+i+t16ra/qbagRL5IeRAxY5a6kp23/EPgy1dy9\nAI9I2pYXvkEDPAFsV9PGMGAz2zOAzzW00WgH4PGSHF5P1XOAqjdxgKTdSls7r+9YpYfzeMP1hWOA\nW3rW20i/AE5RGTOT9KaGbVcA/wLsYHteE/UjXiQ9iBjI/hr4sqR1wPPAx6nuPloAPEQ1p0C3i4Dz\nJT0DvKWhfCTwfUndX5ZOrznOz4ETJd0DLKJKDNheVS5YX1X2Xwm8G/gpcGW5AHxKj7aOK3FsQzW8\n9XJfz/xvVLPszSsxLAHeW7ZdCXyz1GmmfsSL5HXfERFRK0NMERFRK0NMEf2UpIOBL/UoXmL7iE7E\nE0NPhpgiIqJWhpgiIqJWEkRERNRKgoiIiFpJEBERUSsJIiIiav1/DLaZOgzqE7wAAAAASUVORK5C\nYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x124be91d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKYAAAB1CAYAAADEIpr2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADvFJREFUeJztnXuUVdV9xz9fH/hAHhIoAopjW2zERwwKMUkx5NFIscSk\nsQQbn6s19VVLWtOgyxg0arVWTU2tBhsXoiKKxlbx0YCoMVYhgCD4R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SdHmROusz4ZMlTYrh0ZJmS3pB0kxJfSXVAecA342Gw8Ml\nTZB0USxztKTno8XUg5L2j/FPSbpW0hxJr0savosg5aLS89PVcgD1mbnd7jHcmzDFJuCbwG3ZOer4\nuYwmDHJjHb8kzmUTtqW5LF7n7Uz8LcCpMdwrfu4OPAUcFc+fAo7NyhvDJwOTYnh/dszo/S1wfQxP\nAC7KlNl+DrwIfCGGrwB+nLleofwogmfpdvk90lz5rgi4WtLxwDaC7WBfYBFwvaRrCRbsz+Ss7ziC\nI7Bn49x1F+C5OIf8ODBa0v0EI4h/jmXGRBvKPYB+sfyLOa93IHBvNNLtAixt8malHkBP20/HqDuA\naZksBb+o8whGHO1CUsxd+TbQBzjG9mZJy4C9bb8e17GMAq6U9ITtK3LUJ2CG7VMaSZsKXECwDppr\ne4PCjnMXAUNtr41d9N6NlM0aOWTTfwLcYPshSSMILWNb2Bg/t9KO+pKeMXelB7AqKuUXib53JPUH\nPrJ9F3AdYf0LwAaa3ozreeDzkv441tNV0qEx7elYz9kEJQXoTnAnvk5SX4LrxcZYKekwSbsRLIyy\n8hfsHc/IxDcqp4Nf/bWZ58fTolwVJbWYu3I38LCkRcBc4NUYfyRwnaRtwGbg3Bg/EXhc0rsOO3vs\nhO3Vks4E7pG0V4y+FHjdYeOF6cCZRCWyvVDSC/G6vwWeLSLneGA6sDrKuV+MnwBMk7QWmEWwgwR4\nGLg/Dub+vkFdZwC3xtdebxFN1ipJMntLVCWpK09UJakrLyGSZgN7NYg+zfaiSsjTkUldeaIqSV15\noipJipmoSpJiJqqSpJiJqiQpZqIq+X+jTKaDJ+HIYAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x125f500f0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKEAAAB1CAYAAAAm/oGPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD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Fs3wvsKWlv4F3AJfE79mKCwhwUyy+0/dsG\nfS918MmzI7b/jpi+g2ApBMH7xFrbT8b41wn/CFneDowH7ouynA0cHOu+YHtZlL3b9vYGMvWLdjBg\nyMPWTHgHMJIwOvb8k3bUKb8zE9/Jrr/Tyg/zJvjxeZ/trIsSJE0j4wW3DtXaBNgSFTMvIij9hyrk\nOLoXbTSFNBLWpgs4JoZn9LGNmQCS3gFstL2RcIB/djQxQ9LEXrY5NXqiGBbbX1KlzGqgU9JhMX4W\ncE9FmfuB43rKxLXq4bHu/pKmxPQ94kbpVQq6QCkpYW2uBP5e0kOE9VNf2BLrzwM+GtM+S7iW7RFJ\nj8V4b1gGzCWclVkL/KCygO0tBJOs2yWtIozQ83Yt4g2Edd6tkh4BfgEc6eB6byZwbdzkLCTMBHcD\n44vYmCRTriGEpOnAp2yf1o82VgGn217bNMH6SRoJ2wiF2xdWDSYFhDQSDkri5uCWiuSttlvSMWhS\nwkTppOk4UTpJCROlk5QwUTpJCROlk5QwUTr/B0CqCL5BAK3eAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1200a5d30>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAALQAAAB6CAYAAAAWL3n2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEgNJREFUeJztnXm0VNWVh78fiCAiIoIz8mjjhENHxSkdI6ETxzjEOEYb\nMSYOwamTFcVhKa6EbmxjSNPEOIs4RtvgFI2KUztEERQBQQIqigo4NDaIigK7/9i74PJ49eq+R9V7\n9YrzrVWrzj3jrlv7nnvuufvsIzMjkagV2rW2AIlEOUkKnagpkkInaoqk0ImaIil0oqZICp2oKZJC\nr0VIMknfWIPyQyXdVk6Zyk1S6BpF0tOSftracrQ0a6VCS1qntWVIFGdN/p+qVGhJQyS9KWmRpGmS\nfiipo6RPJe2cyddT0heSNonjH0ia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n6kkx4eeZ4Ofn+l2x5Fc0VxO+YL2kAbmx/YhnrX8qqw9f652px\nJnwovqroMOBiSbuYWdkUuxZ66A2BBaHMO+BLgwDG4isnTsCVG9yQ5mhJm8CKNXEN+Vsr/CEfy+2V\nj4YVppOLJBX86h2fKfMocKbcJBRJ22nNd9x9IdPGicCzJfIvovEtq2/A92i/p3DxNpFngePieaEn\nrpjjgXeAvmFd140i+7lLagf0MrOngAvw/65LM+QoSpvvoYG/AmdImo5bdr0IYGYLIq6vmY2PuGmS\nLgEei5P7NTAY/0NWYGafSroeHy/Pwz03FTgVuF7ScvyW+38RfwM+VHgl7gQfsXJJUnM5G7hZ0q+i\nvlNK5J8MLIvh12jcQi7LA/hQo9Rwoxhj8WHQa/gzx/lmNg9A0t34+Xq7gXYLtAduk28RKGBkdBJl\nI1nbNRFJXSzW18kdr29uZue2sli5kNQPGGFm+7W2LJWiFnroluZQSRfi5+4dYFDripOPuPjOpPTY\nuU2TeugKImkXfHYiyxIzW823dWsg6WLgmHrR95jZsNaQpxwkhU7UFLUwy5FIrCApdKKmSAqdqCmS\nQidqiqTQiZri/wHQ9u1vDr+RHQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1241b8240>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAK8AAAB6CAYAAADJYQPpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAES1JREFUeJztnXm0VMWdxz9flSiLIyCIKz5lMBo3oihxlFETjUZjXKLG\naFScHBNcZuJRT4LLKGN0ohMNjjMTR824bwOuaKIz6EQMGIT3FGVxI4IiO4oB1MMSfvNH/S5cm9d9\nbz9fv15efc7p03Vru7/q/nV1Vd36/UpmRiRSj2xSbQEikbYSlTdSt0TljdQtUXkjdUtU3kjdEpU3\nUrfUjfJK6i9ppaRNqy1LRyJpmKQJ1ZajFqlp5ZU0R9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vM/szsCwZdwJnAuOLVVCE/pIO8vDpwAQ2\nKOpS/7c6OWddvwFuAaaY2bIy5ShJQyivmX0ITPSJ2i/bUMUZwA8lvQbMoLQHyl/6BGk6Ybz5msdP\nBh4ljDcfNbNmCy5YrwT+V9LrBGUrNSSBMBa9wP+adyiV0cyeJQwDmn1Ycqknne1yvg4MIox7y+Et\nl+ENoBdwq5l9TDj1dDrB+cuUPBWZWQvh8Mm7ypQhk4ZYKqs2koYR/k4vrLYsX5T2XnaUtD1hQre7\nma1rjzoTGqLnjdQmks4CXgauaG/FhdjzFkXSFcApBdFjrAqbyCXtzcYrD6vMbCMfxZ2JqLyRuiUO\nGyJ1S1TeSN0SlTdSt0TljdQtUXkjdcv/A42p7y5Aw97cAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x125f54400>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKQAAAB6CAYAAAAxgfgeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD3RJREFUeJztnXuUVdV9xz9f5I1GQBSBiIOKIZpgREQ7isFaE3xEo7VR\nbHzQxEdNS0Vt0KysSJOwlmkTaa3VmBiM2iW+ElISNS5IKlABYfABRKWiEAWMvJQBfCD46x/7d+Fw\nex9n7sydOde7P2vdNfvs5++e+5u9zz57/35bZkYkkhU6dbQAkUiSqJCRTBEVMpIpokJGMkVUyEim\niAoZyRRRISOZIipkFZH0lKSvd7AMoyWtKJH+c0nfb0+ZSlHXCinpJklP5MW9UiTuovaVrm0ws3lm\n9qlqtyNpjKQ1ra2nrhUSmAs0StoHQNIAoAtwbF7cEZ43FQrU+72tiHq/aYsJCvg5vx4N/DewIi/u\nVTNbJ6lR0mJJW/xvY64iH56nSHoaeBc4LNmQpAGSlkr6x1ICSRov6SVJWyW9JumqvPRzJT0vqVnS\nq5LGenxfSfdIWifpbUm/8vi9ei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AwnnBc5ktDjzwV6edokwmEGAKuBv/fwNcDdHp4M3FDNe14XS4etYD5h\niGoEbiVsn2oEthCG9JOB6RYOA31L0hzCueLNhBNrVyXqOpBwWu35Vtr3UBfgdkmfA3YBR3r8XwD3\nmNm7AGa2WeFU3UFmNsPj3gfwpe4cpwC3efpSSUs9/kTgKOBpz98VWJAol/OYvAQ4v4S8bUpUyNLk\nniM/S+jh3gCuJyjcPcCpJcpuz7veQuhBTyZvGM9jIvAW4YDSTsD7lQieAgGzzGxckfQP/O8u2lFP\n4jNkaeYDZwObzWyXmW0GehOeLecThu0LJe0j6UBCb7SoSF07CEf0XSrp4hJt7g+8aWYfAZcQHgcg\nPBqMl9QTQFJfM9tKOAj1yx7XLZeeYC5wsad/hjBsAywETpJ0hKf1knQkpdlKlY8UjApZmmWEZ62F\neXFbzGwjMANYSrB9+T3wTTP7U7HKzGw7QcEnSjqnSLY7gMskvQAMY8/5kr8lbOlqkvQ8cIPnvwSY\n4EPxfODgvPruBPaV9BLwXcIQjJltAC4HpnvZBd5eKX4NnFfNSU3c7RPJFLGHjGSKOKnpICR9Ecj3\nPLnKzM7rCHmyQhyyI5kiDtmRTBEVMpIpokJGMkVUyEimiAoZyRT/B0QfnimJLKUpAAAAAElFTkSu\nQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10dbdbb38>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAALQAAAB6CAYAAAAWL3n2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAACrxJREFUeJzt3XuwVWUZx/Hvz7uGWgiiYXDMGEtLC0/kWJqmmKOTZGNl\nY+moo+ElS6cLlqP2B6M2lmWjCZUJlhe0LExRwSadaUQuXgJURlRU0ATRPBwzEfz1x3o3bk7nnL3O\n5uzb2s9nZs9Z+91r7fVs98Py3et917NkmxCKYotGBxDCYIqEDoUSCR0KJRI6FEokdC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cxUhgKpZ26HKENREKHQomEDoUSCR0KJRI6FEokdIuR1J1jnXMlPSHpD2nm3UH1iK0ZREIX\n01nAeNsnkp3rjYQOzU/S9yTNT5OQfpzariWbWjpL0nnAROC8NC/64P7erwjaZqSwaCQdSTbhaBzZ\nnOGZkg6xPVHSUcBhtl9JtxLptn1FI+Otl0jo1nVkepTuuT6ELMEfaFhETSASunUJuNT2lEYH0kyi\nD9267gFOlTQEQNJISbv2st5a2ug21pHQLcr2vcCNwIOSFgG30Xvi3gEc1y4/CmO2XSiUOEKHQomE\nDoUSCR0KJRI6FEokdCiUSOhQKJHQoVAioUOh/A8hxn6AjClhuQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x125f1e208>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAALYAAAB6CAYAAAAS2qnLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEShJREFUeJztnXmcFdWVx78/XGhABRGjoGAbJa6oQUATZURjZoyOWz4u\n2UQ00UFN1EkmisZRJuIENAluIU50FEXF3YSMGrcEcVzYBKVB+UAUBVEkSEAQF/TMH/c8KN50v1fd\n/V6/1/Xu9/OpT9+666nq827dunXvOTIzIpGs0aHSAkQi5SAqdiSTRMWOZJKo2JFMEhU7kkmiYkcy\nSVTsEiFpsKT5ZW7DJO1ezjayQlTsFpKvZGb2rJntUUmZ0iBpsqQfpMy7SNI6SWv8eKLc8pWKzSst\nQKmQtLmZra+0HBnkWDN7qlKNt/j/amZVfQCLgEuAecBK4DagDhgCLAEuBt4FJnj+s4CFwPvAJKBX\noi4DzgUWAB8AVwK7Ac8Dq4H7gC0T+RutC5jida0F1gCn5uRJlN0LmAz8HZgLHJdIGw/8BnjE5ZgK\n7JbiXhiwu4ePAWa53IuBkYl8dcCdwApvfzqwA3AV8Bnwkct9Y4p7f2Qj8Vv6PemXiPsC8CGw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Vu5qKM\n1MRGg0jrULBtcg4+lGoPZK7HzgqSphKmGJOcZmZzSlD3w8CuedEXm9njra27WoiKHckkWX15jNQ4\nUbEjmSQqdiSTRMWOZJKo2JFM8n+aHxpdztFB0gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1268c42b0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(15, 10))\n",
    "for i, feature in enumerate(df_tocopy.columns):\n",
    "    plt.subplot(3, 3, i+1)\n",
    "    df[feature].plot(kind='hist', title=feature)\n",
    "    plt.xlabel(feature)\n",
    "    plt.tight_layout()\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Cleaning data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df['monthly_hours_norm'] = df['average_montly_hours']/df['average_montly_hours'].max()\n",
    "y = df['left'].as_matrix()\n",
    "y_1 = to_categorical(df['left'])\n",
    "Work_accident_categorical = to_categorical(df['Work_accident'])\n",
    "promotion_last_5years_categorical = to_categorical(df['promotion_last_5years'])\n",
    "\n",
    "positions=np.zeros((df.sales.shape[0], 1))\n",
    "for idx,name in enumerate(df.sales):\n",
    "    if name=='sales':\n",
    "        positions[idx,0]=0\n",
    "    elif name=='accounting':\n",
    "        positions[idx,0]=1\n",
    "    elif name=='hr':\n",
    "        positions[idx,0]=2\n",
    "    elif name=='technical':\n",
    "        positions[idx,0]=3\n",
    "    elif name=='support':\n",
    "        positions[idx,0]=4\n",
    "    elif name=='management':\n",
    "        positions[idx,0]=5\n",
    "    elif name=='IT':\n",
    "        positions[idx,0]=6\n",
    "    elif name=='product_mng':\n",
    "        positions[idx,0]=7\n",
    "    elif name=='marketing':\n",
    "        positions[idx,0]=8\n",
    "    else:\n",
    "        positions[idx,0]=9\n",
    "        \n",
    "#df_positions = pd.DataFrame(data=positions, columns=['positions'])\n",
    "categorical_positions = to_categorical(positions)\n",
    "\n",
    "monthly_salary=np.zeros((df.salary.shape[0], 1))\n",
    "for idx,name in enumerate(df.salary):\n",
    "    if name=='low':\n",
    "        monthly_salary[idx,0]=0\n",
    "    elif name=='medium':\n",
    "        monthly_salary[idx,0]=1\n",
    "    else:\n",
    "        monthly_salary[idx,0]=2\n",
    "\n",
    "categorical_salary = to_categorical(monthly_salary)\n",
    "\n",
    "df = df[['satisfaction_level', 'last_evaluation', 'number_project',\n",
    "         'time_spend_company', 'monthly_hours_norm']]\n",
    "\n",
    "df['No Accident'] = Work_accident_categorical[:,0]\n",
    "df['Accident'] = Work_accident_categorical[:,1]\n",
    "df['No promotion'] = promotion_last_5years_categorical[:,0]\n",
    "df['Promotion'] = promotion_last_5years_categorical[:,1]\n",
    "df['sales'] = categorical_positions[:,0]\n",
    "df['accounting'] = categorical_positions[:,1]\n",
    "df['hr'] = categorical_positions[:,2]\n",
    "df['technical'] = categorical_positions[:,3]\n",
    "df['support'] = categorical_positions[:,4]\n",
    "df['management'] = categorical_positions[:,5]\n",
    "df['IT'] = categorical_positions[:,6]\n",
    "df['product_mng'] = categorical_positions[:,7]\n",
    "df['marketing'] = categorical_positions[:,8]\n",
    "df['random'] = categorical_positions[:,9]\n",
    "df['low_salary'] = categorical_salary[:,0]\n",
    "df['medium_salary'] = categorical_salary[:,1]\n",
    "df['high_salary'] = categorical_salary[:,2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "X = df[['satisfaction_level', 'last_evaluation', 'number_project',\n",
    "       'time_spend_company', 'monthly_hours_norm', 'No Accident', 'Accident',\n",
    "       'No promotion', 'Promotion', 'sales', 'accounting', 'hr', 'technical',\n",
    "       'support', 'management', 'IT', 'product_mng', 'marketing', 'random',\n",
    "       'low_salary', 'medium_salary', 'high_salary']].as_matrix()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Dividing data into training and testing sets"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Intializing and Training Logistic Regression model using Keras"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "model = Sequential()\n",
    "model.add(Dense(10, input_shape=(X_train.shape[1],), activation='sigmoid'))\n",
    "model.add(Dense(1, activation='sigmoid'))\n",
    "model.compile(optimizer=Adam(lr=0.1), loss='binary_crossentropy', metrics=['accuracy'])\n",
    "model.fit(X_train, y_train, epochs=40, verbose=0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Predicting outcomes using trained model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "y_train_pred = model.predict(X_train)\n",
    "y_train_class_pred = y_train_pred > 0.5\n",
    "\n",
    "y_test_pred = model.predict(X_test)\n",
    "y_test_class_pred = y_test_pred > 0.5"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Accuracy check"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The training accuracy score is 0.956\n",
      "The testing accuracy score is 0.950\n"
     ]
    }
   ],
   "source": [
    "from sklearn.metrics import accuracy_score\n",
    "print(\"The training accuracy score is {:0.3f}\".format(accuracy_score(y_train, y_train_class_pred)))\n",
    "print(\"The testing accuracy score is {:0.3f}\".format(accuracy_score(y_test, y_test_class_pred)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Confusion matrix"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Training Data Confusion Matrix :\n",
      "\n",
      "           Predicted Left  Predicted Not Left\n",
      "Left                8901                 253\n",
      "Not Left             269                2576\n",
      "\n",
      "\n",
      "Testing Data Confusion Matrix :\n",
      "\n",
      "           Predicted Left  Predicted Not Left\n",
      "Left                2203                  71\n",
      "Not Left              79                 647\n"
     ]
    }
   ],
   "source": [
    "from sklearn.metrics import confusion_matrix\n",
    "\n",
    "def pretty_confusion_matrix(y_true, y_pred, labels=[\"False\", \"True\"]):\n",
    "    cm = confusion_matrix(y_true, y_pred)\n",
    "    pred_labels = [\"Predicted \"+ l for l in labels]\n",
    "    df = pd.DataFrame(cm, index=labels, columns=pred_labels)\n",
    "    return df\n",
    "\n",
    "print(\"Training Data Confusion Matrix :\\n\\n\",pretty_confusion_matrix(y_train, y_train_class_pred, ['Left', \"Not Left\"]))\n",
    "print(\"\\n\")\n",
    "print(\"Testing Data Confusion Matrix :\\n\\n\",pretty_confusion_matrix(y_test, y_test_class_pred, ['Left', \"Not Left\"]))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Precision, Recall and R-2 score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The R2 score on the Train set is:\t0.792\n",
      "The R2 score on the Test set is:\t0.762\n"
     ]
    }
   ],
   "source": [
    "from sklearn.metrics import r2_score\n",
    "print(\"The R2 score on the Train set is:\\t{:0.3f}\".format(r2_score(y_train, y_train_pred)))\n",
    "print(\"The R2 score on the Test set is:\\t{:0.3f}\".format(r2_score(y_test, y_test_pred)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# K-fold cross validation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The cross validation accuracy is 0.9422 ± 0.0188\n"
     ]
    }
   ],
   "source": [
    "from keras.wrappers.scikit_learn import KerasClassifier\n",
    "from sklearn.model_selection import cross_val_score, KFold\n",
    "\n",
    "def build_logistic_regression_model():\n",
    "    model = Sequential()\n",
    "    model.add(Dense(10, input_shape=(X_train.shape[1],), activation='sigmoid'))\n",
    "    model.add(Dense(1, activation='sigmoid'))\n",
    "    model.compile(Adam(lr=0.1),\n",
    "                  'binary_crossentropy',\n",
    "                  metrics=['accuracy'])\n",
    "    return model\n",
    "\n",
    "model = KerasClassifier(build_fn=build_logistic_regression_model,\n",
    "                        epochs=25,\n",
    "                        verbose=0)\n",
    "cv = KFold(5, shuffle=True)\n",
    "scores = cross_val_score(model, X_train, y_train, cv=cv)\n",
    "print(\"The cross validation accuracy is {:0.4f} ± {:0.4f}\".format(scores.mean(), scores.std()))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "The 5-Fold Cross Validation accuracy was almost equal to the Accuracy . \n",
    "Hence we can assume the model is doing good even when the data is shuffled and presented training and testing data in K-Folds\n",
    "\n",
    "-Neelabh Pant"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
